package com.project.common.domain.entity;

import com.project.common.domain.po.BaseAutoKeyPO;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import lombok.Data;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;

import java.time.LocalDateTime;

/**
 * @author: 陈刚
 * @blame:
 * @date: 2022/10/3 23:18
 **/
@Data
@MappedSuperclass
public class Company extends BaseAutoKeyPO {
    @Schema(description = "创建人")
    @CreatedBy
    @Column(name = "create_by")
    private Long createBy;

    @Schema(description = "创建时间")
    @Column(name = "create_time")
    @CreatedDate
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @LastModifiedDate
    @Column(name = "update_time")
    private LocalDateTime updateTime;

    @Schema(description = "更新人")
    @CreatedBy
    @LastModifiedBy
    @Column(name = "update_by")
    private Long updateBy;

    @Schema(description = "企业名称")
    @Column(columnDefinition = "varchar(32) DEFAULT NULL  COMMENT '企业名称'")
    private String name;

    @Schema(description = "企业法人")
    @Column(columnDefinition = "varchar(10) DEFAULT NULL  COMMENT '企业法人'")
    private String realName;

    @Schema(description = "法人手机")
    @Column(columnDefinition = "varchar(11) DEFAULT NULL  COMMENT '法人手机'")
    private String mobile;

    @Schema(description = "社会统一信用代码")
    @Column(columnDefinition = "varchar(30) DEFAULT NULL  COMMENT '社会统一信用代码'")
    private String idcode;

    @Schema(description = "营业执照照片")
    @Column(columnDefinition = "varchar(300) DEFAULT NULL  COMMENT '营业执照照片'")
    private String image;

    @Schema(description = "企业LOGO")
    @Column(columnDefinition = "varchar(300) DEFAULT NULL  COMMENT '企业LOGO'")
    private String logo;

    @Schema(description = "企业规模dic>(code=company-size_type)")
    @Column(columnDefinition = "bigint DEFAULT NULL  COMMENT '企业规模-dic>id(code=company-size_type)'")
    private Long sizeType;

    @Schema(description = "企业性质dic>(code=nature)")
    @Column(columnDefinition = "bigint DEFAULT NULL  COMMENT '企业性质-dic>id(code=nature)'")
    private Long nature;

    @Schema(description = "经营状态dic>(code=businessType")
    @Column(columnDefinition = "varchar(100) DEFAULT NULL  COMMENT '经营状态-dic>id(code=businessType)'")
    private String businessType;

    @Schema(description = "注册资金（元）")
    @Column(columnDefinition = "bigint DEFAULT NULL  COMMENT '注册资金（元）'")
    private Long total;


    @Schema(description = "区域编码")
    @Column(columnDefinition = "varchar(20) DEFAULT NULL  COMMENT '区域编码'")
    private String adcode;

    @Schema(description = "详细地址")
    @Column(columnDefinition = "varchar(200) DEFAULT NULL  COMMENT '详细地址'")
    private String address;

    @Schema(description = "企业简介（富文本）")
    @Column(columnDefinition = "varchar(5000) DEFAULT NULL  COMMENT '企业简介（富文本）'")
    private String profile;

    @Schema(description = "状态（1正常，2禁用）")
    @Column(columnDefinition = "int DEFAULT NULL COMMENT '状态（1正常，2禁用）'")
    private Integer status;

    @Schema(description = "审核状态（0-待审核，1-审核通过，2-审核驳回）")
    @Column(columnDefinition = "int DEFAULT NULL  COMMENT '审核状态（0-待审核，1-审核通过，2-审核驳回）'")
    private Integer acceptStatus;

    @Schema(description = "审核人")
    @Column(columnDefinition = "bigint DEFAULT NULL  COMMENT '审核人'")
    private Long acceptBy;

    @Schema(description = "审核时间")
    @Column(columnDefinition = "datetime DEFAULT NULL  COMMENT '审核时间'")
    private LocalDateTime acceptTime;

    @Schema(description = "审核备注")
    @Column(columnDefinition = "varchar(500) DEFAULT NULL  COMMENT '审核备注'")
    private String acceptRemark;
}
